#ifndef __PYROMETERDIV__H__
#define __PYROMETERDIV__H__

#include "..\\stdafx.h"
class PriceData2{
public:
    String m_key;
	String m_text;
    Long m_color;
    FCRectF m_nowRect;
    double m_value;
	double m_lastClose;
	double m_close;
    PriceData2(){
        m_color = 0;
        m_nowRect.left = 0;
        m_nowRect.top = 0;
        m_nowRect.right = 0;
        m_nowRect.bottom = 0;
        m_value = 0;
		m_lastClose = 0;
		m_close = 0;
    }
};

class PyrometerDiv : public FCDiv{
public:
    ArrayList<double> m_rates;
    int m_tick;
    ArrayList<PriceData2> m_datas;
    int m_timerID;
    bool m_useAnimation;
public:
    PyrometerDiv();
    virtual ~PyrometerDiv();
public:
    ArrayList<FCRectF> m_rects;
    double INF;
    double Rwidth;
    double Rheight;
    int getWIDTH();
    int getHEIGHT();
    int get_WIDTH();
    int get_HEIGHT();
    void layoutrow(ArrayList<double> R, double w);
    double width(ArrayList<double> R, int w);
    double worst(ArrayList<double> R, double w);
public:
    virtual void onAdd();
    virtual void onRemove();
    virtual void onTimer(int timerID);
    virtual void onPaint(FCPaint *paint, const FCRect& clipRect);
    virtual void onSizeChanged();
    virtual void updatePyromoter();
};

#endif
